<template>
    <div>
        <van-nav-bar title="支付成功"  right-text="主页"  @click-right="onClickRight" />

            <van-card num="1" :price="orderinfo.goodPrice+'积分'" :desc="'取件码:'+this.orderinfo.orderCode" :title="this.orderinfo.goodName"  :thumb="this.orderinfo.goodCover" />
    </div>
</template>

<script>
export default {
    data() {
        return {
            code: '',
            orderinfo: {}
        }
    },
    methods: {
        onClickRight() { 

            this.$router.push('/index')
        },
        findSuccessOrder() { 
            this.$axios.post('http://localhost:7000/shop/findSuccessOrder', {code:this.code }).then(res => {
              this.orderinfo= res.data.data
            });
        }

    },
    //生命周期 - 创建完成（访问当前this实例）
    created() {
        
    },
    //生命周期 - 挂载完成（访问DOM元素）
    mounted() {
        this.code = this.$route.params.code;
        this.findSuccessOrder();
    }
}
</script>
<style scoped>
/* @import url(); 引入css类 */

</style>